<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* || 有一边为true,结果就为 true 
            遇到true就会返回
        */

        var b = 0 || "abc"
        var c = "abc" || 1;
        var d = 0 || NaN  
        var f = NaN || 0 
        console.log(b) // abc
        console.log(c) // abc
        console.log(d) // NaN
        console.log(f) // 0
       
    </script>
</body>
</html>